<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="author" content="计科2411-32-赵红云">
    <title>内部样式</title>
    <style>
        div {
            width: 70px;
            height: 30px;
            border: 1px solid blanchedalmond;
            padding: 5px;
            margin: 5px;
            font-size: 14px;
        }

        .d1 {
            background-color: blue;

        }

        .d1.d2 {
            background-color: aliceblue;
        }

        #d3 {
            background-color: pink;
            color: white;
        }

        div[ab="d4"] {
            background-color: bisque;
            color: blue;
        }
    </style>
</head>

<body>
    <div>1</div>
    <div class="d1">1</div>
    <div class="d1 d2">2</div>
    <div id="d3">3</div>
    <div ab="d4">4</div>
</body>

</html>